<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
	<title>数据列表</title>
	<script type="text/javascript" src="${base }/js/My97DatePicker/WdatePicker.js"></script>
</head>
<fieldset>
 <legend>搜索</legend>
 <form action="${base }/sample/list.nutz" method="post">
 <table width="100%">
 	<tr>
 		<td>名称:</td>
 		<td><input name="sampleQuery.name" value="${obj.sampleQuery.name}"/></td>
 		<td>备注:</td>
 		<td><input name="sampleQuery.remark" value="${obj.sampleQuery.remark}"/></td>
 	</tr>
 	<tr>
 		<td>创建时间从:</td>
 		<td><input name="sampleQuery.createTimeFrom" value="${obj.sampleQuery.createTimeFromString }" onClick="WdatePicker()"/></td>
 		<td>至:</td>
 		<td><input name="sampleQuery.createTimeTo" value="${obj.sampleQuery.createTimeToString }" onClick="WdatePicker()"/></td>
 	</tr>
 	<tr>
 		<td colspan="2">
 			<input type="submit" value="搜索"/>
 		</td>
 	</tr>
 </table>
 </form>
</fieldset>
<button onclick="javascript:window.location='${base}/sample/add.nutz'">增加数据</button>
<table width="100%" border="1">
	<tr>
		<th>ID</th>
		<th>名称</th>
		<th>备注</th>
		<th>性别</th>
		<th>体重</th>
		<th>创建时间</th>
		<th>操作</th>
	</tr>
	<c:forEach items="${obj.list}" var="sample">
		<tr>
			<td>${sample.id}</td>
			<td>${sample.name}</td>
			<td>${sample.remark}</td>
			<td>${sample.sex}</td>
			<td>${sample.weight}</td>
			<td>${sample.createTimeString}</td>
			<td>
				<a href="${base}/sample/edit.nutz?id=${sample.id}">编辑</a>
				&nbsp;
				<a href="${base}/sample/delete.nutz?id=${sample.id}">删除</a>
			</td>
		</tr>
	</c:forEach>
</table>
<c:forEach begin="1" end="${obj.pager.pageCount}" varStatus="status">
<a href="${ctx}/sample/list.nutz?pager.pageNumber=${status.count}">${status.count}</a>
</c:forEach>
</html>
